import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import moment from 'moment'

import { Tabbar, TabbarItem, NavBar, CellGroup, Cell, Field, Button } from 'vant'
Vue.use(Tabbar).use(TabbarItem).use(NavBar).use(CellGroup).use(Cell).use(Field).use(Button)

Vue.filter('fmtTime', function (mytime) {
  // mytime = new Date(mytime)
  // let y = mytime.getFullYear()
  // let m = mytime.getMonth() + 1
  // let d = mytime.getDate()
  // return y + '-' + m + '-' + d
  let newtime = moment(mytime).format('YYYY-MM-DD')
  return newtime
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
